home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / gfx / misc / vlabtv015.lha / VLabTV / Install_VLabTV next >
Text File  |  1996-04-12  |  12KB  |  308 lines

  1. ;******************************************************************************
  2. ;     __  __ __            __     ______ __  __
  3. ;    / / / // /           / /    /_  __// / / /
  4. ;   / / / // /    ______ / /___   / /  / / / /
  5. ;  / / / // /    / __  // __  /  / /  / / / /
  6. ; / /_/ // /___ / __  // /_/ /  / /  / /_/ /
  7. ; \____//_____//_/ /_//_____/  /_/   \____/
  8. ;
  9. ; $VER: .13a_VLabTV_Installer (Jan-15-1996) 
  10. ; Changes, suggestions or problems: rcr@netcom.com
  11. ; If you wish to use any part of this installer you must ask.
  12. ;
  13. ; Installer by Robert C. Reiswig ©1995, 1996 
  14. ; VLabTV    by Frank Mariak      ©1995, 1996 
  15. ;******************************************************************************
  16.  
  17. ;*** System Stuff ***
  18. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  19. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  20. (set osver (/ (getversion "LIBS:version.library") 65536))
  21. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  22. (set fastmem (- totmem graphmem))
  23.  
  24. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  25. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  26. (if (= osver 41) (set workbench "3.2"))
  27.  
  28. (set cpu (database "cpu"))
  29. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  30. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  31. (if (= cpu 68040) (set #cpu 4)) 
  32. (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  33.  
  34. (if (> cpu 68010)  (set #fpuGuess 0)  (set #fpuGuess 1) )
  35.    
  36. (set vernum1 (getversion "VLabTV")) (set ver1 (/ vernum1 65536)) 
  37. (set rev1 (- vernum1 (* ver1 65536) ) ) (set VLabTVver (cat ver1 "." rev1))
  38.  
  39. (if (> (exists ("env:Language")) 0) (set lanfound (getenv "Language")) )
  40. (set lan 0)
  41.  
  42. (if (= "english"    lanfound) (set lan 0))
  43. (if (= "deutsch"    lanfound) (set lan 1))
  44. (if (= "italiano"   lanfound) (set lan 2)) 
  45.  
  46. (set #English    "English")
  47. (set #Deutsch    "Deutsch")
  48. (set #Italiano  "Italiano")
  49.  
  50. (set mfound 0) (set newicon1 1) 
  51. (set keeper 1) (set firsttime 0)
  52.  
  53. ;********************************************************************
  54. ; English Strings
  55. ;********************************************************************
  56. (set #about (cat "\n\n\n\nWelcome to VLabTV " VLabTVver "\n\n\nCopyright © 1995,1996 by\n\nFrank Mariak\n") )
  57. (set #whereVLabTV "Where do you wish to install VLabTV. A directory called 'VLabTV' will be created if one is not there. If a copy of VLabTV is found it will be backed up.")
  58. (set #filethere1 "\n\nThe installer has found VLabTV version ")
  59. (set #filethere2 " at ")
  60. (set #filethere3 "\n\nThe file will be renamed to ")
  61. (set #filethere4 " and it will then be moved to ")
  62. (set #backuptoXXX "Back-UP to file named 'VLabTV.")
  63. (set #copyover "Copy Over Old Version")
  64. (set #oktodelete1 "\nIs it ok to delete the older VLabTV binary so that the VLabTV Directory can be made?\n")
  65. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ VLabTV binary so that the VLabTV Directory can be made?\n")
  66. (set #VLabTVfound "\nThe Installer has found a copy of VLabTV already installed. What do you want to do?\n")
  67. (set #newicon "\nDo you wish to copy over The VLabTV Icon from the archive? If you have any ToolTypes already set you should select no.\n")
  68. (set #nonewicon  "No  - ToolTypes already set.")
  69. (set #yesnewicon "Yes - Copy over Icon.")
  70. (set #whatcat "\nSelect the VLabTV Language catalog you wish to install.\n")
  71. (set #wherecat "\nWhere do you wish to install the VLabTV Language Catalog? Default is ")
  72. (set #catnofind "Can not find this catalog in this VLabTV archive. You may need to get a newer archive.")
  73. (set #whatdocs "\nWhat VLabTV documentation would you like to install?\n")
  74. (set #wheredocs "Where would you like the VLabTV documentation you selected to be installed?")
  75. (set #byebye (cat "\nVLabTV Install Complete!\n\n" ))
  76.  
  77.  
  78.  
  79. ;********************************************************************
  80. ; German Strings
  81. ;********************************************************************
  82.  
  83. (if (= lan 1)
  84. (
  85.  (set po 1)
  86.  
  87. (set #about (cat "\n\n\n\nWillkommen zu VLabTV " VLabTVver "\n\n\nCopyright © 1995,1996 by\n\nFrank Mariak\n") )
  88. (set #whereVLabTV "Wohin wollen Sie VlabTV installieren ? Ein Verzeichnis 'VLabTV' wird erzeugt, wenn es nicht existiert. Wenn bereits eine VLabTV Version vorhanden ist, wird diese gesichert.")
  89. (set #filethere1 "\n\nDas Installationsprogramm fand VLabTV Version ")
  90. (set #filethere2 " at ")
  91. (set #filethere3 "\n\nDie Datei wird umbenannt in ")
  92. (set #filethere4 " und wird dann verschoben nach ")
  93. (set #backuptoXXX "sichern als Datei 'VLabTV.")
  94. (set #copyover "alte Version überschreiben")
  95. (set #oktodelete1 "\nSind Sie damit einverstanden, daß das alte VLabTV Hauptprogramm gelöscht, so daß das VLabTV Verzeichnis erstellt werden kann?\n")
  96. (set #oktodelete2 "\nSind Sie damit einverstanden, daß das alte _umbenannte_ VLabTV Hauptprogramm gelöscht wird, so daß das VLabTV Verzeichnis erstellt werden kann?\n")
  97. (set #VLabTVfound "\nDas Installationsprogramm hat bereits eine installierte VLabTV Version gefunden. Was wollen Sie tun?\n")
  98. (set #newicon "\nWollen Sie das VlabTV Piktogramm aus dem Archiv übernehmen? Wenn Sie bereits die Programmmerkmale verändert haben, wählen Sie bitte Nein.\n")
  99. (set #nonewicon  "Nein  - Programmmerkmale verändert.")
  100. (set #yesnewicon "Ja - Überschreibe Icon.")
  101. (set #whatcat "\nWählen Sie die Sprache, die installiert werden soll.\n")
  102. (set #wherecat "\nWohin wollen Sie die VLabTV Sprachdatei installieren? Eingestellt ist ")
  103. (set #catnofind "Ich kann die passende Sprachdatei im Archiv nicht finden. Sie benötigen ggfls. ein neueres Archiv.")
  104. (set #whatdocs "\nWelche Anleitung wollen Sie installieren ?\n")
  105. (set #wheredocs "Wohin wollen Sie die gewählte Anleitung kopieren?")
  106. (set #byebye (cat "\nVLabTV Installation abgeschlossen!\n\n" ))
  107.  
  108. )
  109. )
  110.  
  111. ;********************************************************************
  112. ; Hello
  113. ;********************************************************************
  114. (message #about)
  115. (welcome) 
  116.  
  117. ;********************************************************************
  118. ; Ask where to put VLabTV & Make dir if needed
  119. ;********************************************************************
  120. (set VLabTVdir  (askdir (prompt #whereVLabTV)
  121.                 (help   #whereVLabTV)
  122.                      (default "Work:")
  123.                )  
  124. )
  125.  
  126. (set where VLabTVdir)
  127.  
  128. ;********************************************************************
  129. ; Check to see if VLabTV is already there, if so ask to backup
  130. ;********************************************************************
  131. (if (= 1 (exists (tackon where "VLabTV") ) ) 
  132.   (
  133.     (set vernum1 (getversion (tackon where "VLabTV") ))
  134.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  135.     (set VLabTV_old (cat ver1 "." rev1))
  136.  
  137.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  138.                   (cat "VLabTV" VLabTV_old) #filethere4 (tackon VLabTVdir "VLabTV") )
  139.     )
  140.     
  141.  
  142.     (copyfiles (source (tackon where "VLabTV"))
  143.                (dest where) 
  144.                (infos)
  145.                (newname (cat "VLabTV." VLabTV_old))
  146.     )
  147.     
  148.     (delete (tackon VLabTVdir "VLabTV") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  149.  
  150.     (if (< (exists (tackon VLabTVdir "VLabTV")) 2) (makedir (tackon VLabTVdir "VLabTV") (infos)) )    
  151.  
  152.     (copyfiles (source (tackon where (cat "VLabTV." VLabTV_old) ))
  153.                        (dest (tackon VLabTVdir "VLabTV")) 
  154.                        (infos)
  155.                
  156.     )
  157.  
  158.     (delete (tackon where (cat "VLabTV" VLabTV_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  159.  
  160.     ;(set firsttime 1)
  161.  
  162.   )
  163. )
  164.  
  165. (if (< (exists (tackon VLabTVdir "VLabTV")) 2) (makedir (tackon VLabTVdir "VLabTV") (infos)) )
  166. (set where (tackon VLabTVdir "VLabTV"))
  167. (set @default-dest where)
  168.  
  169. ;********************************************************************
  170. ; Check for old & backup
  171. ;********************************************************************
  172. (if (exists (tackon where "VLabTV")) 
  173.   (
  174.       (set vernum1 (getversion (tackon where "VLabTV") ))
  175.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  176.       (set VLabTV_old (cat ver1 "." rev1))
  177.  
  178.       (set keeper  (askchoice (choices  (cat #backuptoXXX VLabTV_old "'")  #copyover)
  179.                      (prompt #VLabTVfound)
  180.                  (help   #VLabTVfound)
  181.                      (default 0)
  182.                )
  183.       )    
  184.  
  185.  
  186.       (if (= keeper 0)
  187.          (copyfiles (source (tackon where "VLabTV"))
  188.                      (dest where) 
  189.                      (infos)
  190.                      (newname (cat "VLabTV" VLabTV_old))
  191.          )
  192.       )          
  193.  
  194.       (set firsttime 1)
  195.     
  196.   )
  197. )
  198.  
  199. ;********************************************************************
  200. ; Copy over correct VLabTV and Icon if wanted
  201. ;********************************************************************
  202. (copyfiles (source "VLabTV") (dest where) (optional "nofail") )
  203.  
  204.  
  205. (if (= firsttime 0)  (copyfiles (source "VLabTV.info") (dest where) (optional "nofail") ) )
  206.  
  207.  
  208. (if (OR (= keeper 0) (= (exists (tackon where "VLabTV.info")) 0))
  209.   (
  210.   
  211.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  212.                            (prompt #newicon)
  213.                        (help   #newicon)
  214.                            (default 0)
  215.             )
  216.    )
  217.   
  218.    (if (= newicon 0) 
  219.      (copyfiles (source "VLabTV.info") (dest where)  (optional "nofail") )
  220.    )
  221.  
  222.   )
  223.  
  224. )
  225.  
  226. ;********************************************************************
  227. ; Select and copy over Catalog
  228. ;********************************************************************
  229. (set catalog (askchoice (choices #English #Deutsch #Italiano) ;#Svenska #Suomi #Français #Norsk #Español #Greek #Nederlands #Bosanski #Dansk #Polski
  230.                            (prompt #whatcat)
  231.                        (help   #whatcat)
  232.                            (default lan)
  233.              )
  234. )
  235.  
  236.  
  237.  
  238. (if (= catalog 0)  (set #lcat #English ))   (if (= catalog 1)  (set #lcat #Deutsch))
  239. (if (= catalog 2)  (set #lcat #Italiano))
  240.  
  241. (if (<> catalog 0)
  242.  (
  243.   (if (> (exists (cat "Catalogs/" #lcat "/vlabtv.catalog")) 0)
  244.     (
  245.         (set wherecat  (askchoice (choices (tackon where (cat "Catalogs/" #lcat)) (cat "Locale:Catalogs/" #lcat) )
  246.                                   (prompt (cat #wherecat (tackon where (cat "Catalogs/" #lcat)) "\n"))
  247.                             (help   #wherecat)
  248.                                (default 0)
  249.                        )  
  250.         )
  251.  
  252.       (if (= wherecat 1)
  253.         (
  254.          (if (< (exists "Locale:") 2) ( (makedir "sys:Locale") (makeassign "Locale" "sys:Locale") ) )
  255.          (if (< (exists "Locale:Catalogs") 2) (makedir "sys:Locale/Catalogs") )
  256.          (if (< (exists (cat "Locale:Catalogs/" #lcat)) 2) (makedir (cat "sys:Locale/Catalogs/" #lcat)) )
  257.          (copylib (source (cat "Catalogs/" #lcat "/vlabtv.catalog")) (dest (cat "sys:Locale/Catalogs/" #lcat)) )
  258.         )
  259.   
  260.         (
  261.          (if (< (exists (tackon where "Catalogs")) 2) (makedir (tackon where "Catalogs")) )
  262.          (if (< (exists (tackon where (cat "Catalogs/" #lcat)) ) 2) (makedir (tackon where (cat "Catalogs/" #lcat)) ) )
  263.          (copylib (source (cat "Catalogs/" #lcat "/vlabtv.catalog")) (dest (tackon where (cat "Catalogs/" #lcat)) ) (optional "nofail") )
  264.         )
  265.       )
  266.  
  267.     )
  268.  
  269.     (message (cat "\nCatalogs/" #lcat "/vlabtv.catalog\n\n" #catnofind))
  270.   )
  271.  
  272.  
  273.  )
  274. )
  275. ;********************************************************************
  276. ; Ask and copy docs if wanted!
  277. ;********************************************************************
  278. (set docs (askoptions (choices " VLabTV.guide")
  279.               (prompt #whatdocs)
  280.                       (help #whatdocs)
  281.                   (default 1)
  282.       )
  283. )
  284.  
  285. (if (<> docs 0)
  286.  (
  287.    (set docsdir (askdir (prompt #wheredocs)
  288.                (help   #wheredocs)
  289.                     (default where)
  290.                 )  
  291.    )
  292.  
  293.    (if (IN docs 0) (copyfiles (source "VLabTV.guide") (dest docsdir) (infos) (optional "nofail") ) )
  294.    
  295.  )
  296. )
  297.  
  298. ;********************************************************************
  299. ; Copy or Update gtlayout.library & vlab.library
  300. ;********************************************************************
  301. (copylib  (source "libs/gtlayout.library") (dest "libs:") )
  302. (copylib  (source "libs/vlab.library") (dest "libs:") )
  303.  
  304. ;********************************************************************
  305. ; End Bye 
  306. ;********************************************************************
  307. (exit #byebye)
  308.